<{include file="admin:common/header.html"}>
<div class="page-title">
    <table width="100%" align="center" cellpadding="0" cellspacing="0" >
        <tr>
            <td width="30" align="right"><img src="<{$pager.url}>/images/main-h5-ico.gif" alt="" /></td>
            <th><{$MOD.title}></th>
            <td align="right"><{link ctl="shop/coupon:create" class="button" title="添加"}>&nbsp;&nbsp;&nbsp;<{link ctl="shop/coupon:so" load="mini:搜索优惠券" width="mini:500" class="button" title="搜索"}></td>
            <td width="15"></td>
        </tr>
    </table>
</div>
<div class="page-data"> 
    <form id="items-form">
    <table width="100%" border="0" cellspacing="0" class="table-data table">
    <tr>
        <th class="w-100">ID</th><th class="w-50">商铺</th><th class="w-100">城市</th><th>标题</th><th>图片</th>
        <th class="w-50">金额</th><th class="w-50">最低消费</th><th class="w-100">有效期</th><th class="w-50">查看数</th>
        <th class="w-50">下载数</th><th class="w-50">排序</th><th class="w-50">审核</th><th class="w-100">添加时间</th><th class="w-150">操作</th>
    </tr>
    <{foreach $items as $item}>
    <tr>
        <td><label><input type="checkbox" value="<{$item.coupon_id}>" name="coupon_id[]" CK="PRI"/><{$item.coupon_id}><label></td>
        <td><{$shop_list[$item.shop_id].title|default:'--'}>(ID:<{$item.shop_id}>)</td>
        <td><{$city_list[$item.city_id].city_name|default:'--'}>(ID:<{$item.city_id}>)</td>
        <td><{$item.title}></td>
        <td><img src="<{$pager.img}>/<{$item.photo}>" photo="<{$pager.img}>/<{$item.photo}>" class="wh-50" /></td>        
        <td>￥<{$item.money}></td><td>￥<{$item.min_amount}></td>
        <td><{$item.expire_label}></td><td><{$item.views}></td><td><{$item.downloads}></td>
        <td><{$item.orderby}></td><td><{if $item.audit}>正常<{else}><b class="red">待审</b><{/if}></td>
        <td><{$item.dateline|format}></td>        
        <td>
            <{link ctl="block/item:push" arg0='coupon' arg1=$item.coupon_id title="推送" load="mini:推送优惠券" class="button"}>
            <{link ctl="shop/coupon:downloadCoupon" args=$item.coupon_id title="下载日志" class="button"}>
            <{link ctl="shop/coupon:edit" args=$item.coupon_id title="修改" class="button"}>
            <{link ctl="shop/coupon:delete" args=$item.coupon_id act="mini:删除" confirm="mini:确定要删除吗？" title="删除" class="button"}>
        </td>
    </tr>
    <{foreachelse}>
     <tr><td colspan="20"><p class="text-align tip-notice">没有数据</p></td></tr>
    <{/foreach}>
    </table>
    </form>
    <div class="page-bar">
        <table>
            <tr>
            <td class="w-100"><label><input type="checkbox" CKA="PRI"/>&nbsp;&nbsp;全选</label></td>
            <td colspan="10" class="left">
                <{link ctl="shop/coupon:delete" type="button" submit="mini:#items-form" confirm="mini:确定要批量删除选中的内容吗?" priv="hide" value="批量删除"}>
                <{link ctl="block/item:batch" args='coupon' type="button" load="mini:批量推荐优惠券" batch="mini:PRI" priv="hide" value="批量推荐"}>
                <{link ctl="shop/coupon:doaudit" type="button" submit="mini:#items-form" confirm="mini:确定要批量审核选中的内容吗?" priv="hide" value="批量审核"}>
            </td>
            <td class="page-list"><{$pager.pagebar}></td>
        </tr>
        </table>
    </div>
</div>
<{include file="admin:common/footer.html"}>